import request from '@/utils/request'

export function list(params) {
  return request({
    url: '/menu/list',
    method: 'get',
    params
  })
}

export function save(data) {
  return request({
    url: `/menu/add`,
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: `/menu/update`,
    method: 'post',
    data
  })
}

export function del(id) {
  return request({
    url: `/menu/delete`,
    method: 'delete',
    params: { id: id }
  })
}
